import ecitys.gcs.*
/*def i = ecitys.gcs.Indice.get(5)
println "${i}"
def wc = ecitys.gcs.ValorIndice.createCriteria()
def r = wc.get(){
        projections{
           property('valor')
        }
        eq('dataDeVigencia',max('dataDeVigencia'))
        groupProperty('valor')
}
println r*/

def i = Indice.get(1)
println "${i}"
def d = new java.lang.Long(2)

def detachedCriteria = DetachedCriteria.forClass(ValorIndice.class).setProjection(Property.forName("dataDeVigencia").max())

def e = ValorIndice.withCriteria {
   //add(Property.forName('dataDeVigencia').gt(detachedCriteria)


}
